package com.bit.java;

public class Test1 {

    public static void productCheak(int height) {
        if(height > 0 && height < 10) {
            System.out.println("合格");
        } else {
            System.out.println("不合格");
        }
    }

    public static void main(String[] args) {
        int product1 = 4;
        productCheak(product1);
        int product2 = 13;
        productCheak(product2);
        int product3 = 8;
        productCheak(product3);
    }

    public static void main1(String[] args) {
        //产品1
        int product1 = 4;
        if(product1 > 0 && product1 < 10) {
            System.out.println("合格");
        } else {
            System.out.println("不合格");
        }

        //产品2
        int product2 = 12;
        if(product1 > 0 && product1 < 10) {
            System.out.println("合格");
        } else {
            System.out.println("不合格");
        }

        //产品3
        int product3 = 6;
        if(product1 > 0 && product1 < 10) {
            System.out.println("合格");
        } else {
            System.out.println("不合格");
        }
    }
}
